package com.yami.shop.mystery.common.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yami.shop.bean.app.dto.ShopCartOrderMergerDto;
import com.yami.shop.bean.dto.SkuStockLockDTO;
import com.yami.shop.bean.model.Order;
import com.yami.shop.common.response.ServerResponseEntity;
import com.yami.shop.mystery.common.model.ActivityPresell;
import com.yami.shop.mystery.common.model.MysteryBox;
import com.yami.shop.mystery.common.model.MysteryBoxOrder;

import java.util.List;

/**
 * 盲盒盒子订单业务接口
 * @author wxf
 * @date 2023/4/13 9:29
 */
public interface MysteryBoxOrderService extends IService<MysteryBoxOrder> {

    /**
     * 提交订单返回订单号
     * @param dto
     * @return
     */
    List<Order> submit(ShopCartOrderMergerDto dto);

    /**
     * 取消未支付订单
     * @param orderNumber
     */
    void cancelUnpayOrderByOrderNumber(String orderNumber);

    /**
     * 锁定库存
     * @param skuStockLocksParam 参数
     * @param orders
     * @return 是否成功
     */
    ServerResponseEntity<?> lock(List<MysteryBoxOrder> skuStockLocksParam, List<Order> orders);

}
